This resource endpoint retrieves a given protected path.
Request Headers | |
---|---|
Accept |
The expected MIME type of the request body. If
the format parameter is present, it takes precedence over the
Accept header. |
A successful call to the endpoint will return the HTTP code 200 OK
.
This is the standard response for successful HTTP requests. The actual response
will depend on the request method used.
Produces | |
---|---|
application/xml | XML Content |
application/json | JSON Content |
text/html | HTML Web Content |
manage-admin
role,
or the following privilege:
http://marklogic.com/xdmp/privileges/manage
This resource endpoint retrieves a given protected path.
The structure of the output returned from this REST API is as follows:
protected-path
meta
This is a complex structure with the following children:
uri
current-time
elapsed-time
start-min
view-error
This is a complex structure with the following children:
error-type
error-name
error-code
error-message
relations
This is a complex structure with the following children:
relation-group
This is a complex structure with the following children:
uriref
typeref
roleref
relation-count
relation
This is a complex structure with the following children:
qualifiers
This is a complex structure with the following children:
qualifier
This is a complex structure with the following children:
uriref
typeref
idref
nameref
uriref
typeref
roleref
idref
nameref
related-views
This is a complex structure with the following children:
related-view
This is a complex structure with the following children:
view-type
view-name
view-uri
> curl -X GET --anyauth -u admin:admin -H "Content-Type:application/xml" http://localhost:8002/manage/v2/protected-paths/
Output:
<?xml version="1.0" encoding="UTF-8"?> <protected-path-default-list xsi:schemaLocation="http://marklogic.com/manage/security manage-security.xsd" xmlns="http://marklogic.com/manage/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <meta> <uri>/manage/v2/protected-paths/</uri> <current-time>2017-05-02T02:05:22.1043833-07:00</current-time> <elapsed-time units="sec">0.010264</elapsed-time> </meta> <list-items> <list-count units="quantity">0</list-count> </list-items> <relations> <relation-group array="true"> <typeref>security-database</typeref> <relation-count units="quantity">1</relation-count> <relation array="true"> <uriref>/manage/v2/databases/Security</uriref> <roleref>database</roleref> <idref>7161534863501463199</idref> </relation> </relation-group> </relations> </protected-path-default-list>
This is the XML output for GET.
> curl -X GET --anyauth -u admin:admin \ -H "Content-Type:application/json" \ http://localhost:8002/manage/v2/protected-paths//11247920484610845208
Output:
{ "protected-path-default-list":{ "meta":{ "uri":"/manage/v2/protected-paths/", "current-time":"2017-05-02T02:05:22.1039234-07:00", "elapsed-time":{ "units":"sec", "value":0.0107508} } , "list-items":{ "list-count":{ "units":"quantity", "value":0} } , "relations":{ "relation-group":{ "typeref":"security-database", "relation-count":{ "units":"quantity", "value":1} , "relation":{ "uriref":"/manage/v2/databases/Security", "roleref":"database", "idref":"7161534863501463199", "nameref":"Security"} } } , "related-views":{ "related-view":[ { "view-type":"root", "view-name":"default", "view-uri":"/manage/v2"} ] } } }
This is the JSON output for GET.